Kanzi 3.9.10
kanzi::LegacyGraphicsOutput Class Reference

LegacyGraphicsOutput class. More...

#include <kanzi/core.ui/platform/graphics_output/legacy/legacy_graphics_output.hpp>

Inheritance diagram for kanzi::LegacyGraphicsOutput:
[legend]

Public Member Functions

bool bringToFront () noexcept override
 WindowedGraphicsOutput::bringToFront() implementation.
 
optional< void * > createImage (int target, void *data, int *attributes) noexcept override
 GLGraphicsOutput::createImage() implementation.
 
bool destroyImage (void *image) noexcept override
 GLGraphicsOutput::destroyImage() implementation.
 
optional< SurfaceColorSpacegetColorSpace () const noexcept override
 GLGraphicsOutput::getColorSpace() implementation.
 
struct KzsDesktopgetDesktop () const
 Gets associated legacy desktop.
 
struct KzsDisplaygetDisplay (size_t index) const
 Access associated legacy display by index.
 
optional< GraphicsContextAPIgetGraphicsContextAPI () const noexcept override
 GLGraphicsOutput::getGraphicsContextAPI() implementation.
 
optional< void * > getNativeContextHandle () const noexcept override
 GLGraphicsOutput::getNativeContextHandle() implementation.
 
optional< void * > getNativeDisplayHandle () const noexcept override
 GLGraphicsOutput::getNativeDisplayHandle() implementation.
 
NativeInputHandle getNativeInputHandle ()
 Gets the associated native input handle.
 
optional< void * > getNativeSurfaceHandle () const noexcept override
 GLGraphicsOutput::getNativeSurfaceHandle() implementation.
 
optional< NativeWindowHandlegetNativeWindowHandle () const noexcept override
 WindowedGraphicsOutput::getNativeWindowHandle() implementation.
 
KZ_DEPRECATED KZ_NO_DISCARD KzsDisplayOrientationAngle getOrientationAngle () const
 Gets legacy orientation angle.
 
GLGraphicsOutput::GLProcPointer getProcAddress (string_view functionName) override
 GLGraphicsOutput::getProcAddress() implementation.
 
struct KzsSurfacegetSurface () const
 Gets associated legacy surface.
 
optional< SurfaceClientAPIgetSurfaceClientAPI () const noexcept override
 GLGraphicsOutput::getSurfaceClientAPI() implementation.
 
Matrix4x4 getTargetTransformation () const noexcept override
 GLGraphicsOutput::getTargetTransformation() implementation.
 
struct KzsWindowgetWindow () const
 Gets associated legacy window.
 
optional< unsigned intgetWindowHeight () const noexcept override
 WindowedGraphicsOutput::getWindowHeight() implementation.
 
optional< intgetWindowPositionX () const noexcept override
 WindowedGraphicsOutput::getWindowPositionX() implementation.
 
optional< intgetWindowPositionY () const noexcept override
 WindowedGraphicsOutput::getWindowPositionY() implementation.
 
optional< string > getWindowTitle () const noexcept override
 WindowedGraphicsOutput::getWindowTitle() implementation.
 
optional< unsigned intgetWindowWidth () const noexcept override
 WindowedGraphicsOutput::getWindowWidth() implementation.
 
void handleEvents (EventQueue &eventQueue)
 Handles the window resize event.
 
bool hideWindow () noexcept override
 WindowedGraphicsOutput::hideWindow() implementation.
 
 LegacyGraphicsOutput (const struct KzsSurfaceProperties *surfaceProperties, const NativeWindowProperties *windowProperties, const NativeDesktopProperties *desktopProperties)
 Constructor.
 
 LegacyGraphicsOutput (NativeWindowHandle handle, const struct KzsSurfaceProperties *surfaceProperties, const NativeWindowProperties *windowProperties, const NativeDesktopProperties *desktopProperties)
 Constructor.
 
void logExtensions () const
 Logs the extensions of the graphics context.
 
void logProperties () const
 Logs the properties of the graphics output.
 
bool makeCurrent () override
 GLGraphicsOutput::makeCurrent() implementation.
 
bool makeFullscreen () noexcept override
 WindowedGraphicsOutput::makeFullscreen() implementation.
 
bool makeMaximized () noexcept override
 WindowedGraphicsOutput::makeMaximized() implementation.
 
bool makeMinimized () noexcept override
 WindowedGraphicsOutput::makeMinimized() implementation.
 
bool makeRegular () noexcept override
 WindowedGraphicsOutput::makeRegular() implementation.
 
bool moveWindow (int positionX, int positionY) noexcept override
 WindowedGraphicsOutput::moveWindow() implementation.
 
bool releaseCurrent () override
 GLGraphicsOutput::releaseCurrent() implementation.
 
bool resize (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resize() implementation.
 
bool resizeWindow (unsigned int width, unsigned int height) noexcept override
 WindowedGraphicsOutput::resizeWindow() implementation.
 
bool setWindowTitle (string_view title) noexcept override
 WindowedGraphicsOutput::setWindowTitle() implementation.
 
bool showWindow () noexcept override
 WindowedGraphicsOutput::showWindow() implementation.
 
bool swapBuffers () override
 GLGraphicsOutput::swapBuffers() implementation.
 
bool swapInterval (int interval) override
 GLGraphicsOutput::swapInterval() implementation.
 
 ~LegacyGraphicsOutput () override
 Destructor.
 
- Public Member Functions inherited from kanzi::GraphicsOutput
KZ_NO_DISCARD Vector2 getDpi () const noexcept
 Returns the resolution of the target coordinate system in dots per inch.
 
KZ_NO_DISCARD unsigned int getHeight () const noexcept
 Returns the height of layout area in the target coordinate system.
 
KZ_NO_DISCARD unsigned int getWidth () const noexcept
 Returns the width of layout area in the target coordinate system.
 
virtual ~GraphicsOutput ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::GLGraphicsOutput
virtual ~GLGraphicsOutput ()=default
 Destructor.
 
- Public Member Functions inherited from kanzi::WindowedGraphicsOutput
virtual ~WindowedGraphicsOutput ()=default
 Destructor.
 

Protected Member Functions

virtual EventQueue::ProcessingResult handleEvent (InputEvent *event)
 Handles a single event from a queue.
 
void setTargetTransformation (Matrix4x4 targetTransformation)
 Sets the target transformation.
 
void updateCachedValues (unsigned int width, unsigned int height)
 Updates all cached values from given layout size.
 
void updateSurfaceSize (unsigned int width, unsigned int height)
 Resizes the surface to match given layout size.
 
void updateTargetTransformation (unsigned int width, unsigned int height)
 Modifies the target transformation to match given layout size.
 
virtual void windowResizedOverride (unsigned int width, unsigned int height)
 Called whenever window size has changed.
 
- Protected Member Functions inherited from kanzi::GraphicsOutput
void updateDpi (Vector2 dpi)
 Updates the target layout area resolution.
 
void updateSize (unsigned int width, unsigned int height)
 Updates the target layout area size.
 

Protected Attributes

struct KzsDesktopm_desktop
 Legacy desktop for application.
 
struct KzsSurfacem_surface
 System-dependent surface implementation.
 
struct KzsWindowm_window
 System-dependent window implementation.
 

Additional Inherited Members

- Public Types inherited from kanzi::GLGraphicsOutput
using GLProcPointer
 Pointer to GL function.
 

Detailed Description

LegacyGraphicsOutput class.

A graphics output implementation that provides basic GL rendering output.

Constructor & Destructor Documentation

◆ LegacyGraphicsOutput() [1/2]

kanzi::LegacyGraphicsOutput::LegacyGraphicsOutput ( const struct KzsSurfaceProperties * surfaceProperties,
const NativeWindowProperties * windowProperties,
const NativeDesktopProperties * desktopProperties )
explicit

Constructor.

Parameters
surfacePropertiesSpecifies properties to request for the associated GL surface.
windowPropertiesSpecifies properties to request for the associated window.
desktopPropertiesSpecifies properties to request for the desktop.
Since
Kanzi 3.9.7 added desktopProperties.

◆ LegacyGraphicsOutput() [2/2]

kanzi::LegacyGraphicsOutput::LegacyGraphicsOutput ( NativeWindowHandle handle,
const struct KzsSurfaceProperties * surfaceProperties,
const NativeWindowProperties * windowProperties,
const NativeDesktopProperties * desktopProperties )
explicit

Constructor.

Parameters
handleHandle to an existing window.
surfacePropertiesSpecifies properties to request for the associated GL surface.
windowPropertiesSpecifies properties to request for the window.
desktopPropertiesSpecifies properties to request for the desktop.
Since
Kanzi 3.9.7 added desktopProperties.

◆ ~LegacyGraphicsOutput()

kanzi::LegacyGraphicsOutput::~LegacyGraphicsOutput ( )
override

Destructor.

Member Function Documentation

◆ getProcAddress()

GLGraphicsOutput::GLProcPointer kanzi::LegacyGraphicsOutput::getProcAddress ( string_view functionName)
overridevirtual

◆ makeCurrent()

bool kanzi::LegacyGraphicsOutput::makeCurrent ( )
overridevirtual

◆ releaseCurrent()

bool kanzi::LegacyGraphicsOutput::releaseCurrent ( )
overridevirtual

◆ swapBuffers()

bool kanzi::LegacyGraphicsOutput::swapBuffers ( )
overridevirtual

◆ swapInterval()

bool kanzi::LegacyGraphicsOutput::swapInterval ( int interval)
overridevirtual

◆ getTargetTransformation()

Matrix4x4 kanzi::LegacyGraphicsOutput::getTargetTransformation ( ) const
inlineoverridevirtualnoexcept

◆ getNativeDisplayHandle()

optional< void * > kanzi::LegacyGraphicsOutput::getNativeDisplayHandle ( ) const
overridevirtualnoexcept

◆ getNativeContextHandle()

optional< void * > kanzi::LegacyGraphicsOutput::getNativeContextHandle ( ) const
overridevirtualnoexcept

◆ getNativeSurfaceHandle()

optional< void * > kanzi::LegacyGraphicsOutput::getNativeSurfaceHandle ( ) const
overridevirtualnoexcept

GLGraphicsOutput::getNativeSurfaceHandle() implementation.

Returns nullopt.

Implements kanzi::GLGraphicsOutput.

◆ createImage()

optional< void * > kanzi::LegacyGraphicsOutput::createImage ( int target,
void * data,
int * attributes )
overridevirtualnoexcept

◆ destroyImage()

bool kanzi::LegacyGraphicsOutput::destroyImage ( void * image)
overridevirtualnoexcept

◆ getGraphicsContextAPI()

optional< GraphicsContextAPI > kanzi::LegacyGraphicsOutput::getGraphicsContextAPI ( ) const
overridevirtualnoexcept

◆ getSurfaceClientAPI()

optional< SurfaceClientAPI > kanzi::LegacyGraphicsOutput::getSurfaceClientAPI ( ) const
overridevirtualnoexcept

◆ getColorSpace()

optional< SurfaceColorSpace > kanzi::LegacyGraphicsOutput::getColorSpace ( ) const
overridevirtualnoexcept

◆ getOrientationAngle()

KZ_DEPRECATED KZ_NO_DISCARD KzsDisplayOrientationAngle kanzi::LegacyGraphicsOutput::getOrientationAngle ( ) const

Gets legacy orientation angle.

New code should use GLGraphicsOutput::getTargetTransformation() instead.

Returns
Display orientation angle.

◆ handleEvents()

void kanzi::LegacyGraphicsOutput::handleEvents ( EventQueue & eventQueue)

Handles the window resize event.

Parameters
eventQueueQueue holding the events to handle.

◆ logProperties()

void kanzi::LegacyGraphicsOutput::logProperties ( ) const

Logs the properties of the graphics output.

◆ logExtensions()

void kanzi::LegacyGraphicsOutput::logExtensions ( ) const

Logs the extensions of the graphics context.

◆ getNativeInputHandle()

NativeInputHandle kanzi::LegacyGraphicsOutput::getNativeInputHandle ( )

Gets the associated native input handle.

Returns
Native input handle.

◆ getDesktop()

struct KzsDesktop * kanzi::LegacyGraphicsOutput::getDesktop ( ) const

Gets associated legacy desktop.

Returns
Desktop.

◆ getWindow()

struct KzsWindow * kanzi::LegacyGraphicsOutput::getWindow ( ) const

Gets associated legacy window.

Returns
Window.

◆ getSurface()

struct KzsSurface * kanzi::LegacyGraphicsOutput::getSurface ( ) const

Gets associated legacy surface.

Returns
Surface.

◆ getDisplay()

struct KzsDisplay * kanzi::LegacyGraphicsOutput::getDisplay ( size_t index) const

Access associated legacy display by index.

Parameters
indexDisplay index to access.
Returns
Display at given index or nullptr.

◆ resize()

bool kanzi::LegacyGraphicsOutput::resize ( unsigned int width,
unsigned int height )
overridevirtualnoexcept

◆ setWindowTitle()

bool kanzi::LegacyGraphicsOutput::setWindowTitle ( string_view title)
overridevirtualnoexcept

◆ getWindowTitle()

optional< string > kanzi::LegacyGraphicsOutput::getWindowTitle ( ) const
overridevirtualnoexcept

WindowedGraphicsOutput::getWindowTitle() implementation.

Returns nullopt.

Implements kanzi::WindowedGraphicsOutput.

◆ resizeWindow()

bool kanzi::LegacyGraphicsOutput::resizeWindow ( unsigned int width,
unsigned int height )
overridevirtualnoexcept

WindowedGraphicsOutput::resizeWindow() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ getWindowWidth()

optional< unsigned int > kanzi::LegacyGraphicsOutput::getWindowWidth ( ) const
overridevirtualnoexcept

◆ getWindowHeight()

optional< unsigned int > kanzi::LegacyGraphicsOutput::getWindowHeight ( ) const
overridevirtualnoexcept

◆ moveWindow()

bool kanzi::LegacyGraphicsOutput::moveWindow ( int positionX,
int positionY )
overridevirtualnoexcept

◆ getWindowPositionX()

optional< int > kanzi::LegacyGraphicsOutput::getWindowPositionX ( ) const
overridevirtualnoexcept

◆ getWindowPositionY()

optional< int > kanzi::LegacyGraphicsOutput::getWindowPositionY ( ) const
overridevirtualnoexcept

◆ makeFullscreen()

bool kanzi::LegacyGraphicsOutput::makeFullscreen ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeFullscreen() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeRegular()

bool kanzi::LegacyGraphicsOutput::makeRegular ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeRegular() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeMaximized()

bool kanzi::LegacyGraphicsOutput::makeMaximized ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeMaximized() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ makeMinimized()

bool kanzi::LegacyGraphicsOutput::makeMinimized ( )
overridevirtualnoexcept

WindowedGraphicsOutput::makeMinimized() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ showWindow()

bool kanzi::LegacyGraphicsOutput::showWindow ( )
overridevirtualnoexcept

◆ hideWindow()

bool kanzi::LegacyGraphicsOutput::hideWindow ( )
overridevirtualnoexcept

WindowedGraphicsOutput::hideWindow() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ bringToFront()

bool kanzi::LegacyGraphicsOutput::bringToFront ( )
overridevirtualnoexcept

WindowedGraphicsOutput::bringToFront() implementation.

Returns false.

Implements kanzi::WindowedGraphicsOutput.

◆ getNativeWindowHandle()

optional< NativeWindowHandle > kanzi::LegacyGraphicsOutput::getNativeWindowHandle ( ) const
overridevirtualnoexcept

◆ setTargetTransformation()

void kanzi::LegacyGraphicsOutput::setTargetTransformation ( Matrix4x4 targetTransformation)
inlineprotected

Sets the target transformation.

Parameters
targetTransformationThe target transformation matrix.

◆ updateTargetTransformation()

void kanzi::LegacyGraphicsOutput::updateTargetTransformation ( unsigned int width,
unsigned int height )
protected

Modifies the target transformation to match given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

◆ updateSurfaceSize()

void kanzi::LegacyGraphicsOutput::updateSurfaceSize ( unsigned int width,
unsigned int height )
protected

Resizes the surface to match given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

◆ updateCachedValues()

void kanzi::LegacyGraphicsOutput::updateCachedValues ( unsigned int width,
unsigned int height )
protected

Updates all cached values from given layout size.

Parameters
widthLayout area width in pixels.
heightLayout area height in pixels.

◆ windowResizedOverride()

virtual void kanzi::LegacyGraphicsOutput::windowResizedOverride ( unsigned int width,
unsigned int height )
inlineprotectedvirtual

Called whenever window size has changed.

Parameters
widthNew window content area width in pixels.
heightNew window content area height in pixels.

◆ handleEvent()

virtual EventQueue::ProcessingResult kanzi::LegacyGraphicsOutput::handleEvent ( InputEvent * event)
protectedvirtual

Handles a single event from a queue.

Parameters
eventEvent to handle.
Returns
Processing result.

Member Data Documentation

◆ m_desktop

struct KzsDesktop* kanzi::LegacyGraphicsOutput::m_desktop
protected

Legacy desktop for application.

◆ m_window

struct KzsWindow* kanzi::LegacyGraphicsOutput::m_window
protected

System-dependent window implementation.

◆ m_surface

struct KzsSurface* kanzi::LegacyGraphicsOutput::m_surface
protected

System-dependent surface implementation.


The documentation for this class was generated from the following file: